package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface OrderDetailMapper {


    /**
     * 批量插入订单明细数据
     * @param orderDetailList
     */
    void insertBatch(List<OrderDetail> orderDetailList);

    /**
     * 根据订单id查询订单菜品情况
     *
     * @param OrderId
     *
     **/
    @Select("select * from order_detail where order_id = #{OrderId}")
    List<OrderDetail> getByOrderId(Long OrderId);

    @Select("select * from order_detail where ")
    List<String> getNameBySales(LocalDate begin, LocalDate end);
}
